package online.longzipeng.mywebdemo;

import lombok.extern.slf4j.Slf4j;
import online.longzipeng.mywebdemo.config.MyConfig1;
import online.longzipeng.mywebdemo.config.MyConfig2;
import online.longzipeng.mywebdemo.config.MyConfig3;
import online.longzipeng.mywebdemo.config.MyConfig4;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

/**
 * @Author: lzp
 * @description: 配置类测试
 * @Date: 2023/3/15
 */
@Slf4j
@SpringBootTest(classes = MyWebDemoApplication.class,
		// 配置端口启动，否则获取失败
		webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class MyConfigDemo {

	/**
	 * 注意：这种方式可能存在隐患，只用于学习讨论，不建议用于生产环境
	 */

	@Test
	public void getAppInfo1() {
		System.out.println(MyConfig1.appKey);
		System.out.println(MyConfig1.appSecret);
	}

	@Test
	public void getAppInfo2() {
		System.out.println(MyConfig2.appKey);
		System.out.println(MyConfig2.appSecret);
	}

	@Test
	public void getAppInfo3() {
		System.out.println(MyConfig3.appKey);
		System.out.println(MyConfig3.appSecret);
	}

	@Test
	public void getAppInfo4() {
		System.out.println(MyConfig4.appKey);
		System.out.println(MyConfig4.appSecret);
	}

}
